home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / math / fixfloa2 / fixfloat.inc < prev    next >
Encoding:
Text File  |  1995-03-26  |  2.3 KB  |  106 lines

  1. ;
  2. ; asm header file for fixfloat funcs
  3. ;
  4.  
  5. extern rand32_                  : proc near
  6. extern randpowint_              : proc near
  7. extern randinter_               : proc near
  8.  
  9. extern ffsmul_                  : proc near
  10. extern ffmul_                   : proc near
  11. extern ffsdiv_                  : proc near
  12. extern ffdiv_                   : proc near
  13. extern ffsin_                   : proc near
  14. extern ffcos_                   : proc near
  15. extern ffasin_                  : proc near
  16. extern ffacos_                  : proc near
  17. extern fftan_                   : proc near
  18. extern ffatan_                  : proc near
  19. extern ff_vec_to_ang_           : proc near
  20. extern fflog2_                  : proc near
  21. extern ffexp2_                  : proc near
  22. extern ffpow_                   : proc near
  23. extern ffsqrt_                  : proc near
  24. extern ffhyp_                   : proc near
  25. extern fftrihyp_                : proc near
  26. extern ffmuldiv_                : proc near
  27. extern ffmmd_                   : proc near
  28. extern ffortproj_               : proc near
  29. extern ffortproj1_              : proc near
  30. extern ffdot_through_hyps_      : proc near
  31. extern ffalmosthyp_             : proc near
  32.  
  33. extern ff_double_div_           : proc near
  34. extern ff_double_shift_         : proc near
  35.  
  36. extern isqrt_                   : proc near
  37.  
  38.  
  39.  
  40. ; below macros are to replace routine calls
  41. ; from assembly
  42.  
  43. ; for multiplies one factor is placed in EAX
  44. ; the other one passed as an argument
  45.  
  46. ; for divides the dividend (above line) is
  47. ; placed in EAX, the divisor (below line) is
  48. ; passed as an argument. NOTE Dont use EDX as
  49. ; divisor since eax is expanded into edx 
  50. ; before dividing.
  51.  
  52. ; Note these divides does no div by 0 checking
  53. ; and might raise exceptions
  54.  
  55. ; all foru of these macros modify EDX
  56.  
  57.  
  58. MFFSMUL     MACRO      MULTIPLIER
  59.  
  60.     imul    MULTIPLIER
  61.     shrd    eax,edx,16
  62.  
  63. ENDM
  64.  
  65. MFFMUL      MACRO      MULTIPLIER
  66.  
  67.     mul     MULTIPLIER
  68.     shrd    eax,edx,16
  69.  
  70. ENDM
  71.  
  72. MFFSDIV     MACRO      DIVISOR
  73.  
  74.     cdq
  75.     shld    edx,eax,16
  76.     shl     eax,16
  77.     idiv    DIVISOR
  78.     
  79. ENDM
  80.  
  81. MFFDIV      MACRO      DIVISOR
  82.  
  83.     mov     edx,eax
  84.     shl     eax,16
  85.     shr     edx,16
  86.     div     DIVISOR
  87.     
  88. ENDM
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.